package org.indolphin.platform.auth.controller;

import org.indolphin.platform.auth.service.MenuService;
import org.indolphin.platform.common.entity.DataResult;
import org.indolphin.platform.common.entity.Menu;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RequestMapping("/menu")
@RestController
public class MenuController {

    @Resource
    private MenuService menuService;

    @GetMapping("/query")
    public DataResult<List<Menu>> queryMenuList() {
        return DataResult.success(menuService.queryMenuList());
    }

    @GetMapping("/queryTree")
    public DataResult<List<Menu>> queryMenuTree() {
        return null;
    }
}
